var e = require;
var t = module;
var Adv_skd=require("./Adv_skd");
cc.Class({
    extends: cc.Component,
    properties: {lvSelectRoot: cc.Node, pbLevelSelectItem: cc.Prefab, labelTitle: cc.Label},
    onDestroy: function onDestroy() {
        "TT" == lplatform.channel && lplatform.hideBanner();
    },
    onEnable: function onEnable() {
        (this.node.scale = 0.001), cc.tween(this.node).to(0.5, {scale: 1}, {easing: "sineIn"}).start();
    },
    start: function start() {
        Adv_skd.default.instance.showInterstitialAd();
        lplatform.showBanner();
    },
    reset: function reset() {
        (this.labelTitle.string = lGlobal.modelNames[lGlobal.model]), this.lvSelectRoot.removeAllChildren();
        var e = lGlobal.lvCfg.json[lGlobal.model];
        if (e)
            for (var t = 0; t < e.length; t++) {
                cc.instantiate(this.pbLevelSelectItem).parent = this.lvSelectRoot;
            }
    },
    onBtnCloseClick: function onBtnCloseClick() {
        var e = this;
        cc
            .tween(this.node)
            .to(0.5, {scale: 0}, {easing: "sineIn"})
            .call(function () {
                e.node.active = !1;
            })
            .start(),
            soundMgr.playSound(soundMgr.wrong);
    }
});
